Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

London | Shohreh Bayat | Form-control | Week 2 #303

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Shohreh-bayat
Copy link

@Shohreh-bayat Shohreh-bayat commented Oct 31, 2024

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

Copy link

netlify bot commented Oct 31, 2024

Deploy Preview for cyf-ufd ready!

Name Link
🔨 Latest commit 7938623
🔍 Latest deploy log https://app.netlify.com/sites/cyf-ufd/deploys/6723d59c543ef10008787d33
😎 Deploy Preview https://deploy-preview-303--cyf-ufd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Shohreh-bayat Shohreh-bayat added the Needs Review Participant to add when requesting review label Oct 31, 2024
</div>
<div>
<label for="email">Email</label>
<input type="email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$" id="email" placeholder="Enter Your e-mail" required>
Copy link

@giorgigutsaevi giorgigutsaevi Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done on using the regex pattern! 👏 Regex in general is a really big subject, and it goes very deep and can be used to create very complicated and sometimes very useful checks.

If you want to learn more on Regex - I really like Corey Schafer's explanation - he has his Youtube channel, and even though his channel is primarily geared towards Python (One of the best languages out there!! 😊), his Regex explanation is pretty much language agnostic. So you can follow it on your own time, at your own pace.

<input type="email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$" id="email" placeholder="Enter Your e-mail" required>
</div>
<div>
Choose your T-shirt's colour
Copy link

@giorgigutsaevi giorgigutsaevi Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Web Development, there's a very big and important topic called Accessibility.

I have linked you a documentation found on MDN Web Docs. For all things Web Development & JavaScript, MDN documentation will generally be your best friend, you can find so much there and the information there is the best! My recommendation would be, if you are unsure of smth, always check MDN docs, it has the most up-to-date and useful information with regards to Web Development (and not only) 😊

So having said this, you can use some Semantic HTML to let the users using screen readers know how everything on the website is organised and structured.

So considering the T shirt colour option for the user, you can technically wrap radio buttons in a fieldset with a legend tags, to provide more context for the users with screen readers.

Semantic elements and a better organised HTML structure, can also improve website's SEO, which is a big topic on its own and you can read more on it in your own time. SEO is generally used heavily in marketing, but we as developers have to do our best to help better optimise our website!

Choose your T-shirt's colour
<div>
<label for="Red">Red</label>
<input type="radio" name="colour" id="Red" value="Red" required>
Copy link

@giorgigutsaevi giorgigutsaevi Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When it comes to HTML attributes and conventions around naming, it's generally better to use lower case, as opposed to having Capitalisation in your attributes.

So generally id="size" and name="size" will improve consistency, readability and will follow HTML conventions, which will make other developers love your work ethic 🥳

Here's a W3Schools short guide on HTML attributes.

</div>
Choose your T-shirt's Size
<div>
<label for="Size">T-shirt's Size</label>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, you could use a better semantic approach to better structure your HTML markup.

@giorgigutsaevi giorgigutsaevi added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review labels Nov 1, 2024
Copy link

@giorgigutsaevi giorgigutsaevi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! 🎉 Congrats on completing this!

You have showcased a solid understanding of HTML & CSS which is the foundation of great User Experience (or UX in short) in modern Web Development.

My humble advice would be for you to get familarised with the topics of Accessibility and Semantics and how they come into play. The general goal is to make the website as easy-to-use for the users as possible. So, having said this, following Accessibility conventions and patterns will eventually prove to make your website better-optimised and ultimately a great user experience, which is paramount and very important in our field.

You can make use of the Lighthouse, it's a tool built by Google devs to run performance, accessibility and SEO checks against your website and once it's done, it will analyse your website and give you a score. It also gives you some recommendations based on your codebase, and is an amazing tool to make your website run smooth 😊

There are other tools similar like Lighthhouse, I will leave that research up to you :)

@Shohreh-bayat Shohreh-bayat added Complete Participant to add when work is complete and review comments have been addressed Reviewed Volunteer to add when completing a review and removed Reviewed Volunteer to add when completing a review labels Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Participant to add when work is complete and review comments have been addressed Reviewed Volunteer to add when completing a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants